import React, { Component } from 'react';
import { View, Text } from 'react-native';

/**
 * 基类容器方法，处理一些公共的逻辑
 */
const BaseComponentF = (ChildComponent, title) => {
    //基类容器
    class BaseComponent extends React.Component {
        //设置通用标题
        static navigationOptions = ({ navigation }) => ({
            title: title ? title : "aaaa"//navigation.state.params.title
        })

        render() {
            return (
                <View style={{ flex: 1 }}>
                    <ChildComponent {...this.props} />
                </View>
            );
        }
    }
    return BaseComponent;
}

export default BaseComponentF;